//
//  SearchRightCell.m
//  PaiLeXiongProject
//
//  Created by 小獾科技 on 2017/9/6.
//  Copyright © 2017年 小獾科技. All rights reserved.
//

#import "SearchRightCell.h"

@interface SearchRightCell ()
@property (nonatomic, strong) UILabel *label;
@end
@implementation SearchRightCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        _label = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, GWIDTH / 2 - 40, 50)];
        _label.text = @"幼儿英语启蒙";
        _label.textColor = ColorFrom16(0x666666);
        _label.font = PFRFONT(14);
        _label.textAlignment = 1;
        [self addSubview:_label];
    }
    return self;
}

- (void)configViewWithModel:(SearchRightModel *)model index:(NSInteger)index
{
//    for (NSDictionary *dic in model.data) {
    RightModel *rightModel = model.data[index];
        _label.text = rightModel.type_name;
//    }
}

- (void)configNearbyWithModel:(SearchNearbyModel *)model index:(NSInteger)index
{
    aRightModel *amodel = model.child_zone[index];
    NSLog(@"-------%@, %ld", amodel, index);
    
    _label.text = amodel.zone;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
